import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'

// 按需引入vant组件
import {
	Button,
	Checkbox,
	Radio,
	RadioGroup,
	Swipe,
	SwipeItem,
	SwipeCell,
	DropdownMenu,
	DropdownItem
} from 'vant'
import 'vant/es/button/style'
import 'vant/es/radio/style'
import 'vant/es/swipe-cell/style'
import 'vant/es/swipe-item/style'
import 'vant/es/swipe/style'
import 'vant/es/checkbox/style'
import 'vant/es/dropdown-menu/style'
import 'vant/es/dropdown-item/style'
import { Form } from 'vant'
import 'vant/es/form/style'
import { Field } from 'vant'
import 'vant/es/field/style'
import { Picker } from 'vant'
import 'vant/es/picker/style'
import { Popup } from 'vant'
import 'vant/es/popup/style'
import { Icon } from 'vant'
import 'vant/es/icon/style'
import { Toast } from 'vant'
import { Loading } from 'vant'
import 'vant/es/loading/style'
import { Lazyload } from 'vant'
import 'vant/es/lazyload/style'
import { CellGroup } from 'vant'
import 'vant/es/cell-group/style'
import 'vant/es/toast/style'
import { Dialog } from 'vant'
import 'vant/es/dialog/style'
import { Notify } from 'vant'
import 'vant/es/notify/style'
import { Cascader } from 'vant'
import 'vant/es/cascader/style'
import { Space } from 'vant'
import 'vant/es/space/style'
import { FloatingBubble } from 'vant'
import 'vant/es/floating-bubble/style'
import { ImagePreview } from 'vant'
import 'vant/es/image-preview/style'
import { Uploader } from 'vant'
import 'vant/es/uploader/style'
import { DatePicker } from 'vant'
import 'vant/es/date-picker/style'
import { Tabbar } from 'vant'
import 'vant/es/tabbar/style'
import { TabbarItem } from 'vant'
import { Switch } from 'vant'
import 'vant/es/switch/style'
import 'vant/es/tabbar-item/style'
import { Col, Row } from 'vant'
import 'vant/es/col/style'
import 'vant/es/row/style'
import { NavBar } from 'vant'
import 'vant/es/nav-bar/style'
import { Cell } from 'vant'
import 'vant/es/cell/style'
import { Popover } from 'vant'
import 'vant/es/popover/style'
import { Tab } from 'vant'
import 'vant/es/tab/style'
import { Tabs } from 'vant'
import 'vant/es/tabs/style'
import { Overlay } from 'vant'
import 'vant/es/overlay/style'

import '@/postrem' // 设置postcss-px2rem基础大小
// import '@/assets/js/autotrack' // 埋点处理

// import(/* webpackChunkName: "npm.vconsole" */ 'vconsole').then(
// 	(data) => new data.default()
// )
import '@/assets/scss/index.scss'
// import '@/assets/fonts/SourceHanSansSC/index.css' // 思源柔黑
import '@/assets/fonts/Zcool/index.css' // 站酷字体
// import '@/assets/fonts/GenJyuuGothic/index.css' // 思源柔黑
import FlexBox from '@/components/flex-box.vue'
import Card from '@/components/card.vue'
import Pdf from '@/components/pdf.vue'
import Images from '@/components/images.vue'
import ListenScroll from '@/components/listen-scroll.vue'

// setTimeout(() => {
// 	location.reload()
// }, 5000)

createApp(App)
	.use(store)
	.use(router)

	.use(Button)
	.use(Field)
	.use(Form)
	.use(Cell)
	.use(CellGroup)
	.use(Cascader)
	.use(Lazyload)
	.use(Loading)
	.use(Icon)
	.use(Toast)
	.use(Tab)
	.use(Tabs)
	.use(Dialog)
	.use(Notify)
	.use(ImagePreview)
	.use(Space)
	.use(FloatingBubble)
	.use(Picker)
	.use(Popup)
	.use(Uploader)
	.use(DatePicker)
	.use(Swipe)
	.use(SwipeItem)
	.use(SwipeCell)
	.use(Radio)
	.use(RadioGroup)
	.use(Tabbar)
	.use(TabbarItem)
	.use(Col)
	.use(Row)
	.use(Switch)
	.use(NavBar)
	.use(Checkbox)
	.use(DropdownMenu)
	.use(DropdownItem)
	.use(Popover)
	.use(Overlay)
	.component('flex-box', FlexBox)
	.component('card', Card)
	.component('pdf', Pdf)
	.component('images', Images)
	.component('listen-scroll', ListenScroll)
	.mount('#app')

// 开启录屏
Recorder.start({
	channel: 'bwyl',
	compress: true,
	testServer: 'https://tkpromotion.baigebao.com/insurance/api/open/putJsonV2'
})
